package com.woniu.userservice.entity;

import lombok.Data;

/**
 * @author: 张腾飞  <br/>
 * Date: 2020/3/25:10:14  <br/>
 * Description: 返回体
 */
@Data
public class ReturnBody<T> {

    private Integer state;
    /**
     * //状态码
     */
    Integer code;

    /**
     *  //信息
     */
    String msg;
    /**
     * 条数
     */
    Integer count;
    /**
     * 数据
     */
    T data;


    public ReturnBody() {
        this.state=200;
        this.msg="成功";
    }

    public ReturnBody(Integer code, String msg, Integer count, T data) {
        super();
        this.code = code;
        this.msg = msg;
        this.count = count;
        this.data = data;
    }
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public Integer getCount() {
        return count;
    }
    public void setCount(Integer count) {
        this.count = count;
    }
    public T getData() {
        return data;
    }
    public void setData(T data) {
        this.data = data;
    }

    /**
     * @return the state
     */
    public Integer getState() {
        return state;
    }

    /**
     * @param state the state to set
     */
    public void setState(Integer state) {
        this.state = state;
    }

}
